﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint.Administration;

namespace CodeCounsel.SharePoint.NavigationService.NavigationWebPart
{
    public class NavigationWebPart : WebPart
    {
        protected override void Render(HtmlTextWriter writer)
        {
            NavigationService service = SPFarm.Local.GetChild<NavigationService>();
            writer.WriteEncodedText(service.Application.GetNavigation());
        }
    }
}
